Optimal. Leaf size=80 \[ \frac {A \log (x) (a+b x)}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {(a+b x) (A b-a B) \log (a+b x)}{a b \sqrt {a^2+2 a b x+b^2 x^2}} \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {770, 72} \begin {gather*} \frac {A \log (x) (a+b x)}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {(a+b x) (A b-a B) \log (a+b x)}{a b \sqrt {a^2+2 a b x+b^2 x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 72
Rule 770
Rubi steps
\begin {align*} \int \frac {A+B x}{x \sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {A+B x}{x \left (a b+b^2 x\right )} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {\left (a b+b^2 x\right ) \int \left (\frac {A}{a b x}+\frac {-A b+a B}{a b (a+b x)}\right ) \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {A (a+b x) \log (x)}{a \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {(A b-a B) (a+b x) \log (a+b x)}{a b \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 44, normalized size = 0.55 \begin {gather*} \frac {(a+b x) ((a B-A b) \log (a+b x)+A b \log (x))}{a b \sqrt {(a+b x)^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [B] time = 0.43, size = 186, normalized size = 2.32 \begin {gather*} \frac {\left (a \sqrt {b^2} B-a b B-2 A \sqrt {b^2} b\right ) \log \left (\sqrt {a^2+2 a b x+b^2 x^2}+a-\sqrt {b^2} x\right )}{2 a b \sqrt {b^2}}+\frac {(2 A b-a B) \log \left (-a b \sqrt {a^2+2 a b x+b^2 x^2}+a^2 b+a b \sqrt {b^2} x\right )}{2 a b}-\frac {B \log \left (\sqrt {a^2+2 a b x+b^2 x^2}-a-\sqrt {b^2} x\right )}{2 \sqrt {b^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 28, normalized size = 0.35 \begin {gather*} \frac {A b \log \relax (x) + {\left (B a - A b\right )} \log \left (b x + a\right )}{a b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 49, normalized size = 0.61 \begin {gather*} \frac {A \log \left ({\left | x \right |}\right ) \mathrm {sgn}\left (b x + a\right )}{a} + \frac {{\left (B a \mathrm {sgn}\left (b x + a\right ) - A b \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{a b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 49, normalized size = 0.61 \begin {gather*} -\frac {\left (b x +a \right ) \left (-A b \ln \relax (x )+A b \ln \left (b x +a \right )-B a \ln \left (b x +a \right )\right )}{\sqrt {\left (b x +a \right )^{2}}\, a b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.56, size = 53, normalized size = 0.66 \begin {gather*} -\frac {\left (-1\right )^{2 \, a b x + 2 \, a^{2}} A \log \left (\frac {2 \, a b x}{{\left | x \right |}} + \frac {2 \, a^{2}}{{\left | x \right |}}\right )}{a} + \frac {B \log \left (x + \frac {a}{b}\right )}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.45, size = 68, normalized size = 0.85 \begin {gather*} \frac {B\,\ln \left (a+b\,x+\sqrt {{\left (a+b\,x\right )}^2}\right )}{b}-\frac {A\,\ln \left (a\,b+\frac {a^2}{x}+\frac {\sqrt {a^2}\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{x}\right )}{\sqrt {a^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.44, size = 41, normalized size = 0.51 \begin {gather*} \frac {A \log {\relax (x )}}{a} + \frac {\left (- A b + B a\right ) \log {\left (x + \frac {- A a + \frac {a \left (- A b + B a\right )}{b}}{- 2 A b + B a} \right )}}{a b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________